import os
 
from ament_index_python.packages import get_package_share_directory
 
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
 
 
def generate_launch_description():
   duckiebot_node = IncludeLaunchDescription(
      PythonLaunchDescriptionSource([os.path.join(
         get_package_share_directory('duckiebot'), 'launch'),
         '/duckiebot_node_launch.py'])
      )
   control_node = IncludeLaunchDescription(
      PythonLaunchDescriptionSource([os.path.join(
         get_package_share_directory('control'), 'launch'),
         '/control_node_launch.py'])
      )
   
   return LaunchDescription([
      duckiebot_node,
      control_node
   ])